package Exercise;

import java.util.*;

/**
 * Description：
 * Author: zhangc
 * Date：2017/8/8 21:25
 */
public class TotalObject {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext())
            list.add(scanner.next());
        if (list.size() <= 0)
            System.out.println(0);
        else {
            Set<String> set = new HashSet<>();
            for (String s : list) {
                StringTokenizer stringTokenizer = new StringTokenizer(s.trim());
                while (stringTokenizer.hasMoreTokens())
                    set.add(stringTokenizer.nextToken());
            }
            System.out.println(set.size());
        }
    }
}
